package com.itheima.Test;

public class MyThread03 extends Thread {
    public static volatile int a = 0;

    @Override
    public void run() {

        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {

        }

        //把a修改
        a = 1;
        System.out.println("a的值已经被修改");

    }
}

